package com.invengo.testrfid;

import android.support.test.runner.AndroidJUnit4;

import com.invengo.testrfid.app.utils.ByteConvertUtils;
import com.invengo.testrfid.app.utils.Constant;
import com.invengo.testrfid.app.utils.MyLogUtils;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.assertEquals;

/**
 * Instrumented test, which will execute on an Android device.
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() throws Exception {


        String x = "abcdefsss";
        String s = ByteConvertUtils.toBinary(x);

        MyLogUtils.log(Constant.ValueOfTag_ADD,s,3);

//        byte[] bytes = ByteConvertUtils.hex2byte(s);
//        String s1 = ByteConvertUtils.byte2hex(bytes);

        String x2 = ByteConvertUtils.toString(s);
        assertEquals(x,x2);
    }
}
